#include <iostream>
#include "Circle.h"

using namespace std;

void printRadius(Circle c)
{
  cout << "Pass object by value." << endl << "c.getRadius() = " << c.getRadius() << endl;
  cout << "c.setRadius(5)" << endl;
  c.setRadius(5);
  cout << "c.getRadius() = " << c.getRadius() << endl;
}

void printRadius_2(Circle &c)
{
  cout << "Pass object by reference." << endl << "c.getRadius() = " << c.getRadius() << endl;
  cout << "c.setRadius(5)" << endl;
  c.setRadius(5);
  cout << "c.getRadius() = " << c.getRadius() << endl;
}

void printRadius_3(const Circle &c)
{
  cout << "Pass object by reference." << endl << "c.getRadius() = " << c.getRadius() << endl;
  cout << "c.setRadius(5)" << endl;
  c.setRadius(5);//should not modify the const object

  cout << "c.getRadius() = " << c.getRadius() << endl;
}

int main()
{
  Circle circle_1;
  //cout << "circle_1.getRadius() = " << circle_1.getRadius() << endl;
  //pass object by value
  printRadius(circle_1);
  cout << "circle_1.getRadius() = " << circle_1.getRadius() << endl;

  //pass object by reference
  printRadius_2(circle_1);
  cout << "circle_1.getRadius() = " << circle_1.getRadius() << endl;

  //pass object by reference
  printRadius_3(circle_1);
  cout << "circle_1.getRadius() = " << circle_1.getRadius() << endl;

  return 0;
}
